from google.appengine.ext import db

class Team(db.Model):
    name = db.StringProperty()
    owner = db.UserProperty()

class Player(db.Model):
    team = db.ReferenceProperty(Team)
    name = db.StringProperty(required=True)
    arrivaldate = db.DateProperty()

class Scoutreport(db.Model):
    player = db.ReferenceProperty(Player)
    report = db.StringProperty(required=True)

class Match(db.Model):
    player = db.ReferenceProperty(Player)
    date = db.DateProperty(auto_now_add=True)
    rating = db.IntegerProperty()
    position = db.StringProperty(choices=set(['keeper', 'wingback', 'defender', 'winger', 'inner midfield', 'forward']))
    minutes = db.IntegerProperty()


